<body>
We pass if we don't crash.
<script>
if (window.testRunner)
    testRunner.dumpAsText();

var child = document.body.appendChild(document.createElement('iframe'));
child.contentDocument.open();
var grandchild = child.contentDocument.appendChild(document.createElement('iframe'));

child.contentWindow.onload = function() {
    var a = grandchild.contentDocument.createElement('a');
    a.href = 'data:text/xml,';
    a.click();
}

var a = grandchild.contentDocument.createElement('a');
a.href = 'data:text/xml,';
a.click();

child.contentDocument.close();

a = grandchild.contentDocument.createElement('a');
a.href = 'data:text/html,';
a.click();
</script>
</body>
